<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<!-- Skrypt pochodzi z ksiki "101 praktycznych skryptw"  -->
<!-- autor: Marcin Lis    e-mail: 101scripts@marcinlis.com  -->
</HEAD>
<STYLE>
#warstwa1, #warstwa2, #warstwa3, #warstwa4, #warstwa5, #warstwa6{
 visibility:visible;
 background-color:red;
 position:absolute;
 width:50;
 height:50;
 layer-background-color:red;
}
</STYLE>
<SCRIPT LANGUAGE="javascript" type="text/javascript">
<!-- Ukrycie przed przegldarkami nie obsugujcymi JavaScriptu
function init(){
 tab = new Array();
 x = 0;
 j = 0;
 for(i = 0; i < 6; i++){
         tab[j++] = Math.sin(x) * 25 + 100;
         x += Math.PI / 3;
 }
}
function ustawWarstwy(){
 if (document.layers){
         document.layers['warstwa1'].top = tab[0];
         document.layers['warstwa2'].top = tab[1];
         document.layers['warstwa3'].top = tab[2];
         document.layers['warstwa4'].top = tab[3];
         document.layers['warstwa5'].top = tab[4];
         document.layers['warstwa6'].top = tab[5];
 }
 else{
         document.getElementById('warstwa1').style.top = tab[0];
         document.getElementById('warstwa2').style.top = tab[1];
         document.getElementById('warstwa3').style.top = tab[2];
         document.getElementById('warstwa4').style.top = tab[3];
         document.getElementById('warstwa5').style.top = tab[4];
         document.getElementById('warstwa6').style.top = tab[5];
 }
}
function przesun(){
 x = tab[0];
 for (i = 0; i < 5; i++){
         tab[i] = tab[i + 1];
 }
 tab[5] = x;
}
function start(){
 setTimeout("start()", 200);
 ustawWarstwy();
 przesun();
}
// Koniec kodu JavaScript -->
</SCRIPT>
<BODY onLoad="init()">
<H1 align = "center">
<DIV id="warstwa1" style="top:50; left:50;">
1
</DIV>
<DIV id="warstwa2" style="top:50; left:110; ">
2
</DIV>
<DIV id="warstwa3" style="top:50; left:170; ">
3
</DIV>
<DIV id="warstwa4" style="top:50; left:230; ">
4
</DIV>
<DIV id="warstwa5" style="top:50; left:290; ">
5
</DIV>
<DIV id="warstwa6" style="top:50; left:350; ">
6
</DIV>
<A HREF="javascript:start()">Start</A>
</H1>
</BODY>
</HTML>
